package com.briup.estore.common.dao;

import com.briup.estore.common.bean.Category;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * @author adam
 * @date 2022/1/12
 */
public interface ICategoryDao extends JpaRepository<Category, Long> {
    List<Category> findByParentIdIsNull();

    List<Category> findByParentId(Long id);

    List<Category> findByNameAndParentIdIsNull(String name);

    List<Category> findByNameAndParentId(String name, long id);


}
